package com.yunshang.shoppingmall.mapper;

import com.yunshang.shoppingmall.entity.Privilege;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PrivilegeMapper {

    int deleteByPrimaryKey(Integer priId);
    //增加权限
    int insert(Privilege  privilege);

    int insertSelective(Privilege record);

    Privilege selectByPrimaryKey(Integer priId);

    int updateByPrimaryKeySelective(Privilege record);

    int updateByPrimaryKeyWithBLOBs(Privilege record);

    int updateByPrimaryKey(Privilege record);

    //根据用户ID删除权限
    int delPrivilegeByUserId(int userId);

    //根据管理员id权限查询
    List<Privilege> selectPrivilegeByUserId(int userId);

}